home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / science / simst35.zip / INSTALL._D2 / DEMO.SCR < prev    next >
Text File  |  1994-11-05  |  46KB  |  1,797 lines

  1. :START;
  2. OPEN SAMPLE.SPS;
  3.  
  4. CLS;
  5. *SET DEMO (2000);  { to run in demo mode with a 2 second delay }
  6.  
  7. SET COLOR BLACK ON CYAN;
  8. IF $MONO SET COLOR BLACK ON LIGHTGRAY;
  9.  
  10. :MAINMENU;
  11.  
  12. ON ESC GOTO MAINMENU;
  13.  
  14. CLS;
  15. IBOX ROW 4 COLOR BLACK ON LIGHTGRAY
  16.        Welcome to the SIMSTAT demonstration program.
  17. Select one of the following commands then press the ENTER key.
  18. ENDBOX;
  19.  
  20. MENU ROW 11
  21. &Overview of SIMSTAT
  22. &Bootstrap analysis
  23. &New features of v3.5
  24. &Command language
  25. b&Anner v1.0
  26. &Registering SIMSTAT
  27. &Quit
  28. ENDMENU;
  29.  
  30. IF $ITEM = 1 GOTO DEMO;
  31. IF $ITEM = 2 GOTO BOOT;
  32. IF $ITEM = 3 GOTO NEW;
  33. IF $ITEM = 4 GOTO LANGUAGE;
  34. IF $ITEM = 5 GOTO BANNER;
  35. IF $ITEM = 6 GOTO ORDER;
  36. IF $ITEM = 7 STOP;
  37.  
  38. GOTO MAINMENU;
  39.  
  40. **************** DEMO *****************;
  41. :DEMO;
  42.  
  43. OPEN SAMPLE.SPS;
  44. CLS;
  45.  
  46. BOX
  47. SIMSTAT v3.5 is an easy to use statistical program
  48. that provides a wide range of statistical analyses,
  49. high-resolution graphs, and powerful simulation tools.
  50. ENDBOX;
  51.  
  52. BOX
  53. One of the most useful features of SIMSTAT is its ability
  54. to perform analyses on various data file formats such as:
  55.  
  56.     ■ dbase II, II or IV (.DBF)
  57.     ■ Lotus 1-2-3 or Symphony (.WKS or WK1)
  58.     ■ Comma-separated value ASCII (.DAT or CSV)
  59.     ■ Fixed format ASCII (.FIX)
  60.     ■ SPSS/PC+ (.SPS, .SYS or SIM)
  61.     ■ SPSS for Windows (.SAV)
  62.  
  63. ENDBOX;
  64. BOX
  65. For the next few minutes, we will take a tour that will show you
  66. the various features of SIMSTAT.  To interrupt the demonstration
  67. simply press the Escape key.
  68. ENDBOX;
  69.  
  70. LIST SEX TO AGGRESS /N 15;
  71.  
  72. BOX ROW 11
  73. Once you have entered your data in a file, the first thing you
  74. will want to do is to check the values in the file to identify
  75. illegal values.  The LIST command displays the values of each
  76. variable previously selected.  This command lists the content
  77. of all cases or can be restricted to a specific number of cases.
  78. ENDBOX;
  79.  
  80. DESC SEX TO AGGRESS;
  81. BOX ROW 9
  82. The DESCRIPTIVE command allows to quickly display
  83. summary statistics on all your variables.
  84. ENDBOX;
  85.  
  86. BOX ROW 8
  87. Besides the mean and the standard deviation which give
  88. a quick overview of the data distribution, the minimum
  89. and maximum values can also be used to identify values
  90. out of range while the number of valid cases allows you
  91. to see how many cases are missing.
  92. ENDBOX;
  93.  
  94. BOX
  95. More detailed statistics can be obtained by using the
  96. FREQUENCY command.  Let us look at them one at the time.
  97. ENDBOX;
  98.  
  99. FREQUENCY AGE
  100.  /TABLE;
  101.  
  102. BOX ROW 3
  103. The FREQUENCY command allows you to display a table of frequencies that
  104. shows the frequency and the percentage of each value in a variable.
  105. ENDBOX;
  106.  
  107. BOX COL 1 ROW 11
  108. While this table is
  109. sorted in ascending
  110. order of values, it is
  111. also possible to sort
  112. it in descending order
  113. of frequency.
  114. ENDBOX;
  115.  
  116. FREQUENCY AGE /DESC CI=80;
  117.  
  118. BOX ROW=5
  119. The FREQUENCY command also displays detailed descriptive
  120. statistics, including measures of central tendency and
  121. of dispersion.  Other statistics are useful to get a
  122. glimpse of the distribution shape.
  123. ENDBOX;
  124.  
  125.  
  126. FREQUENCY AGE /PTILES=10;
  127. BOX ROW 10
  128. The percentiles option provides a more detailed description
  129. of the variable's distribution.  You can specify the number
  130. of categories you want from 2 to 100 categories.
  131. ENDBOX;
  132.  
  133.  
  134. FREQUENCY AGE /PTILES=4;
  135. BOX ROW 12
  136. By setting the number of categories to 4, the
  137. percentiles option produces the interquartile
  138. values also know as Q1, Q2 (or median) and Q3.
  139. ENDBOX;
  140.  
  141. BOX
  142. As you may have noticed, sometimes the results
  143. of a statistical analysis scroll off the screen.
  144. SIMSTAT allows you to browse back through the
  145. previous analyses by using the F2 key.  Let us
  146. browse through what we have done so far.
  147. ENDBOX;
  148.  
  149. BOX
  150. Use the navigation keys to move around the listing.
  151. When you have finished, press the Escape key.
  152. ENDBOX;
  153.  
  154. BROWSE;
  155.  
  156. BOX
  157. A graphic representation is also an efficient
  158. way to examine your data and a powerful means
  159. to communicate them to others.
  160.  
  161. The FREQUENCY command allows you to obtain
  162. various descriptive graphs such as...
  163. ENDBOX;
  164.  
  165. QBOX "a bar chart";
  166. FREQUENCY AGE /BARCHART=G;
  167.  
  168. QBOX "a pie chart" ;
  169. FREQUENCY AGE /PIE;
  170.  
  171. QBOX "a Pareto chart";
  172. FREQUENCY AGE /PARETO;
  173.  
  174. BOX;
  175. The preceding graphs were appropriate to display
  176. information on categorical variables.  But when
  177. the data are quantitative we often use other
  178. types of graphs such as...
  179. ENDBOX;
  180.  
  181. QBOX "an histogram,";
  182. FREQUENCY AGGRESS /HISTO NORMAL NBAR=20;
  183.  
  184. QBOX "a box-&-whisker plot,";
  185. FREQUENCY AGGRESS /BOXPLOT;
  186.  
  187. QBOX "a cumulative distribution chart,";
  188. FREQUENCY AGGRESS /CUMUL;
  189.  
  190. QBOX "or a normal probability plot.";
  191.  
  192. FREQUENCY AGGRESS /PPLOT;
  193.  
  194. CLS;
  195. BOX
  196. Each component of high resolution graphs such as the
  197. title, the axis labels, and scales can be edited.  You
  198. can also add a 3D effect on bars, display horizontal
  199. or vertical grids, and change the color, size, and
  200. appearance of almost any graph component.
  201. ENDBOX;
  202.  
  203. BOX
  204. Graphs can also be printed on almost any
  205. dot matrix, inkjet or laser printer,
  206. including postcript and color printers.
  207. ENDBOX;
  208.  
  209. BOX
  210. They can also be saved on disk in PCX or HPGL
  211. format, to be imported in your favorite word
  212. processor or illustration program.
  213. ENDBOX;
  214.  
  215. CROSSTAB SIBLING BY SEX
  216.  /TABLE DVALUE;
  217.  
  218. BOX COL=51
  219. The CROSSTAB command 
  220. is useful to identify
  221. relationships between
  222. categorical and/or
  223. ordinal variables.
  224. ENDBOX;
  225.  
  226. BOX COL= 51
  227. A standard table produced
  228. by SIMSTAT shows the
  229. number of cases in each
  230. cell of the table.
  231. ENDBOX;
  232.  
  233. BOX
  234. But you can also ask SIMSTAT to include
  235. more detailed information such as:
  236.  
  237.     ■ row percentages
  238.     ■ column percentages
  239.     ■ total percentages
  240.     ■ expected values
  241.     ■ chi-square residuals
  242.     ■ standardized chi-square residuals
  243.  
  244. ENDBOX;
  245.  
  246. QBOX "Let us see a table with row and column percentages";
  247.  
  248. CROSSTAB SIBLING BY SEX
  249.   /TABLE CELLS=12;
  250.  
  251. QBOX "Here it is!" COL 55;
  252.  
  253. BOX
  254. To test whether there is a relationship between
  255. the two variables or to assess the strength of
  256. this relationship, a wide range of statistics can
  257. be obtained.  Some of those statistics are useful
  258. when both variables are nominal, while others are
  259. more appropriate when both variables are ordinal
  260. or continuous.
  261.  
  262. Let us look at all those statistics!
  263. ENDBOX;
  264.  
  265. CROSSTAB SIBLING BY SEX
  266.   /TABLE /STAT=123;
  267.  
  268. QBOX "Here are some statistics used when both variables are nominal" ROW 3;
  269.  
  270. CROSSTAB SIBLING BY SEX
  271.   /TABLE /STAT=456789;
  272.  
  273. QBOX "While the following are used when the data are ordinal" ROW 6;
  274.  
  275. BOX
  276. To visualize the relationship between two categorical
  277. variables SIMSTAT can display a bar chart.
  278. ENDBOX;
  279.  
  280.  
  281. GRAPH 3D OFF OVERLAP 0;
  282. CROSSTAB AGE BY SEX
  283.   /BARCHART;
  284.  
  285. CLS;
  286. BOX
  287. An option panel lets you control the final appearance
  288. of the graph.  For instance, here is the same graph
  289. but with a 3D effect and a 50% bar overlap.
  290. ENDBOX;
  291.  
  292. GRAPH 3D ON OVERLAP 50;
  293. CROSSTAB AGE BY SEX
  294.   /BARCHART;
  295.  
  296. BOX
  297. The MULTIPLE RESPONSE procedure allows you to obtain
  298. frequency analyses and crosstabulation analyses on
  299. variables which can legitimately have more than one
  300. response.  These multiple responses can be stored in
  301. as many variables as necessary.  SIMSTAT will gather
  302. all these responses and treat them as if they were
  303. stored in a single variable.
  304. ENDBOX;
  305.  
  306. MRESPONSE MULTY
  307.   /FREQUENCY SEX SIBLING /TABLE;
  308.  
  309. BOX ROW 2
  310. Beside existing options, graphs and analysis usually available
  311. in the FREQUENCY and CROSSTAB command, the MULTIPLE RESPONSE
  312. computes percentages on the total number of cases and on the
  313. number of valid responses.
  314. ENDBOX;
  315.  
  316. CLS;
  317. BREAKDOWN AGGRESS BY SEX
  318.   /RANGE (1 2);
  319.  
  320.  
  321. BOX ROW 16
  322. The BREAKDOWN command can be used to display the value
  323. of a quantitative variable among various groups defined
  324. by a categorical variable.  The default format outputs
  325. a single line of statistics for each group.
  326. ENDBOX;
  327.  
  328. BREAKDOWN AGGRESS BY SEX /RANGE (1 2) DETAIL;
  329.  
  330. BOX ROW 4
  331. However, you may also obtain more detailed
  332. statistics for each subgroup of subjects.
  333. ENDBOX;
  334.  
  335. BOX
  336. The BREAKDOWN command also allows you to
  337. examine the distribution of each group by
  338. displaying a multiple box-&-whisker plot.
  339. ENDBOX;
  340.  
  341. BREAKDOWN AGGRESS BY SEX /RANGE (1 2) BOXPLOT=G;
  342.  
  343. BOX
  344. While the BREAKDOWN command is useful to identify
  345. differences between subgroups on a quantitative
  346. variable, it cannot be used to decide whether those
  347. data suggest a real difference in the population.
  348. ENDBOX;
  349.  
  350. BOX
  351. SIMSTAT provides numerous analyses appropriate for 
  352. answering this question.  The most common are the
  353. T-TEST and the one-way analysis of variance (or ANOVA).
  354. ENDBOX;
  355.  
  356. BOX
  357. SIMSTAT provides two types of t-test analysis.
  358. ENDBOX
  359.  
  360. T-TEST AGGRESS BY SEX
  361.  /GROUP VALUE 1,2 NOEFFECT;
  362.  
  363. BOX ROW 10 COL 55
  364. An independent or
  365. grouped t-test for
  366. comparing the score
  367. on a quantitative
  368. variable between
  369. two groups defined
  370. by a dichotomous
  371. variable.
  372. ENDBOX;
  373.  
  374. T-TEST HOURSTV BY AGGRESS /PAIRED NOEFFECT;
  375.  
  376. BOX ROW 15 COL 52
  377. And a paired or
  378. correlated t-test
  379. to compare the means
  380. of a single group on
  381. two variables or
  382. of two groups of
  383. paired subjects.
  384. ENDBOX;
  385.  
  386.  
  387. T-TEST AGGRESS BY SEX
  388.  /GROUP VALUE 1,2;
  389.  
  390. BOX ROW 6
  391. Beside descriptive statistics, homogeneity of variance
  392. test, and standard t-test statistics, SIMSTAT also displays
  393. various effect size measures allowing you to assess the
  394. size of the difference between the two groups.
  395. ENDBOX;
  396.  
  397.  
  398. BOX
  399. When performing a t-test, three kinds of graph
  400. can be obtained to visualize the difference:
  401. ENDBOX;
  402.  
  403.  
  404. BOX
  405. a DUAL HISTOGRAM to inspect in detail the data
  406. distribution in both groups.  This graph can be
  407. displayed horizontally,
  408. ENDBOX;
  409.  
  410. T-TEST AGGRESS BY SEX
  411.  /GROUP VALUE (1 2) HISTO NORMAL;
  412.  
  413. CLS;
  414. QBOX "or vertically";
  415.  
  416. T-TEST AGGRESS BY SEX
  417.  /GROUP VALUE (1 2) HISTO VERTICAL;
  418.  
  419. CLS;
  420. BOX
  421. a bar chart representing the mean of both groups with
  422. an option to display an error bar representing either
  423. the standard deviation, the standard error or a user
  424. defined confidence interval.
  425. ENDBOX;
  426.  
  427. T-TEST AGGRESS BY SEX
  428.  /GROUP VALUE (1 2) BARCHART CIBAR CI=90;
  429.  
  430. CLS;
  431. BOX
  432. an finally, an error bar diagram which provides
  433. another way to display the same information.
  434. ENDBOX;
  435.  
  436. T-TEST AGGRESS BY SEX /VALUE (1 2) ERRORCHART CI=90;
  437. CLS;
  438. ONEWAY AGGRESS BY SIBLING;
  439.  
  440. BOX
  441. The ONEWAY anova command allows you to compare
  442. the means of a quantitative variable for two
  443. or more independent groups.
  444. ENDBOX;
  445.  
  446. BOX ROW 4
  447. Beside the standard ANOVA table, SIMSTAT
  448. provides much useful information such as...
  449. ENDBOX;
  450.  
  451. BOX ROW 14
  452. the proportion of explained variance (or R square)
  453. which shows the strength of the relationship,
  454. ENDBOX;
  455.  
  456. BOX ROW 17
  457. a test of homogeneity of variance,
  458. ENDBOX;
  459.  
  460. ONEWAY AGGRESS BY SIBLING /DESC SCHEFFE;
  461.  
  462.  
  463. BOX ROW 3
  464. descriptive statistics for each group,
  465. ENDBOX;
  466.  
  467. BOX ROW 6
  468. And various multiple comparison procedures such as:
  469.  
  470.     ■ Least Significant Difference (LSD)
  471.     ■ Scheffé
  472.     ■ Tukey's HSD (Honestly Significant Difference)
  473.     ■ Newman-Keuls
  474.  
  475. ENDBOX;
  476.  
  477. BOX
  478. The ONEWAY command also allows you to obtain graphical
  479. presentation of the data for each group such as...
  480. ENDBOX;
  481.  
  482. BOX
  483. a barchart representing the mean of each group with
  484. an option to display an error bar representing
  485. either the standard deviation, the standard error
  486. or a user defined confidence interval.
  487. ENDBOX;
  488.  
  489.  
  490.  
  491. ONEWAY AGGRESS BY AGE /BARCHART SD;
  492.  
  493. CLS;
  494. QBOX "an error bar diagram,";
  495. ONEWAY AGGRESS BY AGE /ERRORCHART SD;
  496.  
  497. CLS;
  498. BOX
  499. and a deviation barchart which expresses
  500. the deviation of the mean of each group
  501. from the grand mean.
  502. ENDBOX;
  503.  
  504. ONEWAY AGGRESS BY AGE /DEVCHART;
  505.  
  506. CLS;
  507. BOX
  508. SIMSTAT also provides various tools to examine
  509. the relationship between two or more quantitative
  510. variables such as correlation matrix, linear,
  511. nonlinear, and multiple regression analysis.
  512. ENDBOX;
  513. CORRELATION AGE AGGRESS HOURSTV /EXACT 2TAIL;
  514.  
  515. BOX  COL 48
  516. The CORRELATION command
  517. provides a quick look at
  518. the strength of the linear
  519. relationship between a
  520. number of quantitative
  521. variables.
  522. ENDBOX;
  523.  
  524. {numerous quantitative variable vs a number of}
  525.  
  526. CORRELATION AGE AGGRESS HOURSTV /2TAIL COVAR;
  527. BOX ROW 4
  528. Beside correlation coefficients and their associated
  529. probabilities, SIMSTAT can also display a cross-product
  530. and variance-covariance matrix.
  531. ENDBOX;
  532.  
  533. CORRELATION AGE AGGRESS HOURSTV /2TAIL CI=90;
  534. BOX COL 48
  535. User-specified confidence
  536. intervals can also be
  537. included in the matrix.
  538. ENDBOX;
  539.  
  540. BOX
  541. SIMSTAT also allows you to graphically examine
  542. the relationships between numerous variables
  543. with the use of a scatterplot matrix.
  544. ENDBOX;
  545.  
  546. CORRELATION NO AGE AGGRESS HOURSTV /XYPLOT TREND;
  547.  
  548. REGRESSION AGGRESS BY HOURSTV /LINEAR 2TAIL CI=80;
  549.  
  550. BOX
  551. The REGRESSION analysis can be used to obtain
  552. more detailed information about the relationship
  553. between two quantitative variables.
  554. ENDBOX;
  555.  
  556. BOX ROW 3
  557. The information displayed includes the correlation
  558. coefficient and the proportion of variance explained.
  559. ENDBOX;
  560.  
  561. BOX ROW 7
  562. an anova table,
  563. ENDBOX;
  564.  
  565. BOX ROW 11
  566. and various information about the regression equation
  567. such as the values of the parameters, their confidence
  568. intervals, their probability, etc..
  569. ENDBOX;
  570.  
  571.  
  572. BOX
  573. This procedure can also display a text
  574. and/or graphic scatterplot of the
  575. relationship between the variables;
  576. ENDBOX;
  577.  
  578. REGRESSION AGGRESS BY HOURSTV /LINEAR 2TAIL CI=80 XYPLOT=G;
  579.  
  580. BOX
  581. Beside linear regression, the REGRESSION command
  582. also performs basic nonlinear regression analysis
  583. such as quadratic, cubic, 4th and 5th degree
  584. polynomials, exponential and inverse relationship.
  585. ENDBOX;
  586.  
  587. BOX
  588. For instance, here is an example of a quadratic
  589. relationship between two quantitative variables.
  590. ENDBOX;
  591.  
  592. REGRESSION AGGRESS BY AGE
  593.   /QUADRATIC 2TAIL CI=80 XYPLOT=G;
  594.  
  595. REGRESSION AGGRESS BY HOURSTV /CPLOT OUTLIERS 1.5;
  596.  
  597. BOX ROW 3
  598. SIMSTAT also provides many tools to examine the
  599. residuals and evaluate the appropriateness of the
  600. model such as a caseplot of standardized residuals,
  601. ENDBOX
  602.  
  603. BOX
  604. a scatterplot of predicted values
  605. against standardized residual,
  606. ENDBOX;
  607.  
  608. REGRESSION AGGRESS BY HOURSTV /RPLOT=G;
  609.  
  610. BOX
  611. and a normal probability plot
  612. of the residual values.
  613. ENDBOX;
  614.  
  615. REGRESSION AGGRESS BY HOURSTV /PPLOT;
  616.  
  617. BOX
  618. Predicted and standardized residual values can also
  619. be saved in a separate file for further analysis.
  620. ENDBOX;
  621.  
  622.  
  623. BOX
  624. SIMSTAT also includes a powerful
  625. multiple regression procedure in
  626. which the user can choose among
  627. various regression methods such as:
  628.  
  629.     ■ standard regression
  630.     ■ forward selection
  631.     ■ backward elimination
  632.     ■ stepwise selection
  633.     ■ hierarchical entry.
  634.  
  635. ENDBOX;
  636.  
  637. MULTREG AGGRESS BY AGE SEX HOURSTV
  638.    /HIERARCHICAL
  639.    /ORDER (AGE SEX) (HOURSTV)
  640.    /EQUATION OUT ANOVA CHANGE SUMMARY CI=80;
  641.  
  642. BOX
  643. In addition to all the statistics available in
  644. the REGRESSION command, it is also possible obtain
  645. detailed statistics at each step of the analysis
  646. such as a statistical test of R changes, the
  647. tolerance of variables in the model, the
  648. probability of variables not entered, etc..
  649. ENDBOX;
  650.  
  651. MULTREG AGGRESS BY AGE SEX HOURSTV
  652.    /STEPWISE PIN (0.05) POUT (0.055) TOLERANCE (0.001)
  653.    /ANOVA EQUATION HISTORY
  654.    /RPLOT=G
  655.    /PPLOT;
  656.  
  657. CLS;
  658. BOX
  659. The GLM ANOVA/ANCOVA procedure is a General Linear Models
  660. implementation of analysis of variance and covariance. It
  661. can handle balanced and unbalanced ANOVA designs and support
  662. models with categorical and/or quantitative variables. The
  663. procedure can also be used to perform standard multiple
  664. regression problems that involve interaction terms.
  665. ENDBOX;
  666.  
  667. BOX
  668. The options panel allows you to display
  669. standard ANOVA/ANCOVA tables as well as
  670. various outputs usually found in ANOVA/ANCOVA
  671. or multiple regression analyses.
  672. ENDBOX;
  673.  
  674. SET MORE ON;
  675. GLMANOVA AGGRESS BY AGE SEX SIBLING
  676.  /NONEXPERIMENTAL
  677.  /QUANT AGE
  678.  /INTERACTION AGE*SEX
  679.  /STEP MEAN CHANGE RPLOT=G;
  680.  
  681. SET MORE OFF;
  682.  
  683. BOX
  684. SIMSTAT provides various methods of adjustment
  685. for unequal cell size including a hierarchical
  686. strategy where you can set the order of entry
  687. of each variable in the model.
  688. ENDBOX;
  689.  
  690. SET MORE ON;
  691.  
  692. GLMANOVA AGGRESS BY SEX SIBLING AGE HOURSTV
  693.  /HIERARCHICAL
  694.  /QUANT AGE HOURSTV
  695.  /ORDER (SEX SIBLING AGE) (HOURSTV)
  696.  /MULTREG STEP CHANGE EQUATION CI (95)
  697.  /CPLOT OUTLIERS (1.5) CI (95) PPLOT;
  698.  
  699. SET MORE OFF;
  700.  
  701. CLS;
  702. BOX
  703. The TIME SERIES command allows the examination
  704. of time series. The options panel offers various
  705. transformations to remove trends or seasonal
  706. dependence in a series and provides diagnostics
  707. for those transformations by displaying
  708. autocorrelation and partial autocorrelation
  709. function plots of the transformed series.
  710. ENDBOX;
  711.  
  712. BOX
  713. This panel also allows the application of two smoothing methods
  714. (moving average and running median) to identify trends in noisy
  715. time series data.  Control bars representing the mean and the
  716. confidence limits can also be displayed over the series.
  717. ENDBOX;
  718.  
  719. SET MORE ON;
  720. TIME-SERIES AGGRESS
  721.   /MEAN
  722.   /ACF PACF PLOT
  723.   /MAVG (3 4 5 3)
  724.   /RBAR PCT (95);
  725.  
  726. SET MORE OFF;
  727. CLS;
  728.  
  729. BOX
  730. The SINGLE CASE command provides some basic tools to study
  731. the effect of an intervention on the behavior of a single
  732. subject.  It involves the repeated objective measurement
  733. of the behavior of a single subject (dependent variable)
  734. over a long period of time interspersed with changes in
  735. the treatment condition (independent variable).
  736. ENDBOX;
  737.  
  738. BOX
  739. The procedure will display a graph representing the
  740. evolution of the dependent variable (Y) at various
  741. phases defined by the independent (X) variable.  The
  742. options panel allows you to obtain various statistics
  743. for each phase of the analysis as well as various
  744. graphic tools that can be used as judgement aids for
  745. identifying the experimental effect of the intervention
  746. (smoothed data, split-middle trend, control bars).
  747. ENDBOX;
  748.  
  749. SCED BEHAVIOR BY PHASE
  750.  /DETAIL
  751.  /TREND;
  752.  
  753. BOX ROW 5
  754. Various statistics can also be obtained
  755. on each treatment condition.
  756. ENDBOX;
  757.  
  758. CLS;
  759. BOX
  760. The RELIABILITY command provides a means to assess the
  761. quality of multiple-item additive scales through the
  762. computation of reliability statistics.
  763. ENDBOX;
  764.  
  765. BOX
  766. The options panel offers the possibility to produce
  767. various item statistics (e.g.: mean, minimum, maximum,
  768. standard deviation), iter-item variance-covariance and
  769. correlation matrices, total scale and item-total statistics.
  770. It also allows you to verify the reliability of the scale
  771. through the use of a split-half method or by computing
  772. internal consistency measures.
  773. ENDBOX;
  774.  
  775. BOX
  776. Each selected variable is considered as a single item of
  777. the scale. The Xs and Ys are used in the split-half method
  778. to specify how the various items should be divided.
  779. ENDBOX;
  780.  
  781. DATA
  782. DEPRESS1,DEPRESS2,DEPRESS3,DEPRESS4,DEPRESS5,DEPRESS6,DEPRESS7,DEPRESS8
  783.  1 2 1 1 1 2 1 2
  784.  2 1 1 2 1 1 1 2
  785.  1 1 1 1 1 2 1 1
  786.  1 1 1 2 1 1 1 1
  787.  1 1 1 1 1 2 1 2
  788.  1 2 1 1 1 2 2 2
  789.  1 2 2 1 1 2 1 2
  790.  1 1 2 2 1 1 1 2
  791.  1 2 1 1 1 1 1 2
  792.  1 1 1 1 1 1 1 1
  793.  1 2 2 1 1 2 3 2
  794.  1 1 1 1 1 1 1 2
  795.  1 3 1 1 1 1 2 1
  796.  1 1 1 1 2 1 1 1
  797.  2 2 2 1 2 1 2 2
  798.  1 2 2 1 2 2 1 2
  799.  1 1 1 1 1 2 1 1
  800.  1 2 1 1 1 2 2 2
  801.  1 1 1 1 1 1 1 1
  802.  1 1 1 1 1 1 1 1
  803.  2 2 1 1 1 1 1 1
  804.  1 1 1 1 1 2 1 2
  805.  1 2 1 2 1 1 2 1
  806.  1 2 1 1 1 1 1 2
  807.  1 1 1 1 1 2 1 1
  808.  1 1 1 1 2 1 1 1
  809.  2 2 1 1 2 2 1 2
  810.  1 2 1 1 1 1 1 1
  811.  1 1 1 1 1 1 1 2
  812.  1 1 1 1 1 2 1 1
  813.  1 1 1 1 1 2 1 2
  814.  1 2 1 1 2 2 1 2
  815.  1 2 1 1 1 1 2 2
  816.  1 1 1 1 1 1 1 2
  817.  1 2 2 1 1 3 3 2
  818.  1 2 1 1 1 1 1 1
  819.  1 2 2 1 1 2 1 2
  820.  1 2 2 1 1 2 1 3
  821.  1 1 1 1 1 2 1 1
  822.  1 2 1 1 1 2 1 1
  823.  1 1 1 1 1 1 1 2
  824.  1 2 2 1 2 3 2 2
  825.  2 2 1 2 1 2 2 3
  826.  1 2 1 1 1 1 1 2
  827.  2 2 2 2 2 2 1 2
  828.  1 1 1 1 1 2 1 1
  829.  2 2 2 2 1 2 2 2
  830.  1 2 1 1 1 2 1 2
  831.  1 2 2 1 1 2 1 2
  832.  1 2 1 1 1 2 1 2
  833. ENDDATA;
  834.  
  835. SET MORE ON;
  836. RELIABILITY DEPRESS1 TO DEPRESS4 BY DEPRESS5 TO DEPRESS8
  837.  /ITEM CORR COVAR TOTAL ALPHA SPLIT;
  838.  
  839. PAUSE;
  840. OPEN SAMPLE.SPS;
  841.  
  842. CLS;
  843. BOX
  844. The SENSITIVITY analysis allows one to assess
  845. the ability of a quantitative measure (X) to
  846. differentiate a dichotomous criterion condition
  847. (Y) and provide guidelines to choose an
  848. appropriate cutoff point.
  849. ENDBOX;
  850.  
  851. SENSITIVITY SEX BY AGGRESS
  852.  /VALUE (1) HIGH SSTAT ESTAT;
  853.  
  854. SET MORE OFF;
  855.  
  856. BOX
  857. The program provides for each value of the quantitative
  858. measure the level of sensitivity (proportion of positive
  859. cases correctly diagnosed as true) and specificity
  860. (proportion of negative cases correctly diagnosed as false),
  861. and the percentage of false-positives and false-negatives.
  862. ENDBOX;
  863.  
  864. BOX
  865. The options panel also allows you to obtain a receiver-
  866. operating-characteristic (ROC) curve and Error rate graph.
  867. ENDBOX;
  868.  
  869. SENSITIVITY SEX BY AGGRESS
  870.  /VALUE (1) HIGH ROC ERROR;
  871.  
  872. CLS;
  873. BOX
  874. SIMSTAT also performs a wide range
  875. of nonparametric tests.  Lets take
  876. a look at those test.
  877. ENDBOX;
  878.  
  879. BINOMIAL AGE
  880.   /VALUE 10 PROPORTION .50;
  881.  
  882. BOX ROW 18
  883. The BINOMIAL TEST allows you to assess whether
  884. the observed number of cases in a dichotomous
  885. variable is the same as that expected from a
  886. specified binomial distribution
  887. ENDBOX;
  888.  
  889. CHISQUARE SEX
  890.  /VALUE (1 2)
  891.  /FREQ (40 60);
  892.  
  893. BOX ROW 6
  894. The ONE SAMPLE CHI-SQUARE TEST allows you to assess
  895. whether there is a difference between the observed
  896. number of cases in various categories and the
  897. expected frequencies in those same categories.
  898. ENDBOX;
  899.  
  900. RUNSTEST HOURSTV /MEAN;
  901.  
  902. BOX COL 42
  903. The RUNS TEST to test whether
  904. the ordered sequence in which
  905. observations were obtained
  906. is random.
  907. ENDBOX;
  908.  
  909.  
  910. MCNEMAR SEX BY SIBLING
  911.  /VALUE (1,2) 2TAIL;
  912.  
  913. BOX ROW 3
  914. The McNEMAR TEST is a procedure applied to a pair of
  915. correlated dichotomous variables to test whether there is a
  916. significant difference in proportions of subjects that
  917. change from one category to another.
  918. ENDBOX;
  919.  
  920.  
  921. MANN-WHITNEY AGGRESS BY SEX /VALUE (1 2) 2TAIL;
  922.  
  923. BOX COL 44
  924. The MANN-WHITNEY U test
  925. procedure evaluates the
  926. hypothesis that two
  927. independent samples have
  928. the same distribution.
  929. The Mann-Whitney U is the
  930. nonparametric version of
  931. the t-test for independent
  932. samples.
  933. ENDBOX;
  934.  
  935.  
  936. WILCOXON AGGRESS BY HOURSTV
  937.  /2TAIL;
  938.  
  939. BOX ROW 2
  940. The WILCOXON matched-pairs signed-ranks test is a procedure used
  941. to test whether two related samples have been drawn from the same
  942. population.  It takes into account the magnitude as well as the
  943. direction of the differences between the two variables.
  944. ENDBOX;
  945.  
  946.  
  947. SIGN-TEST AGGRESS BY HOURSTV
  948.  /2TAIL;
  949.  
  950. BOX ROW 4
  951. SIGN TEST tests the hypothesis that two variables
  952. have the same distribution. This is assessed by
  953. comparison of the numbers of positive and negative
  954. differences between the two variables.
  955. ENDBOX;
  956.  
  957.  
  958. KS1 AGGRESS /NORMAL;
  959.  
  960. BOX ROW 8
  961. The KOLMOGOROV-SMIRNOV ONE-SAMPLE TEST compares the
  962. distribution of each variable against a standard normal
  963. distribution or a uniform distribution. It tests whether
  964. the sample data can reasonably be thought to have come from
  965. a population having this theoretical distribution.
  966. ENDBOX;
  967.  
  968. KS2 AGGRESS BY SEX
  969.  /VALUE (1 2);
  970.  
  971. BOX COL 45
  972. The KOLMOGOROV-SMIRNOV
  973. TWO-SAMPLE TEST evaluates
  974. whether a variable (Y) has
  975. the same distribution in two
  976. independent samples as defined
  977. by a grouping variable (X).
  978. This test is sensitive to
  979. differences in the shape,
  980. location, and scale of the
  981. two sample distributions.
  982. ENDBOX;
  983.  
  984. MOSES AGGRESS BY SEX
  985.   /VALUE (1 2) OUTLIERS (5);
  986.  
  987. BOX COL 42
  988. The MOSES TEST of extreme
  989. reactions tests whether the
  990. range of an ordinal variable
  991. is the same in a control
  992. group as in a comparison
  993. group, as defined by a
  994. grouping variable.
  995. ENDBOX;
  996.  
  997.  
  998. KRUSKAL AGGRESS BY AGE
  999.   /RANGE (6 11);
  1000.  
  1001. BOX COL 42
  1002. The KRUSKAL-WALLIS one-way
  1003. analysis of variance by ranks
  1004. is a procedure for testing
  1005. whether k groups have been 
  1006. drawn from the same population.
  1007.  
  1008. This test is a nonparametric
  1009. version of the one-way analysis
  1010. of variance.
  1011. ENDBOX;
  1012.  
  1013. MEDIAN AGGRESS BY SEX /VALUE (1 2);
  1014.  
  1015. BOX ROW = 4
  1016. The MEDIAN TEST is a procedure for testing whether two or
  1017. more independent groups differ in central tendencies. It
  1018. tests the likelihood that those groups were drawn from
  1019. populations with the same median.
  1020. ENDBOX;
  1021.  
  1022. *MEDIAN AGGRESS BY AGE /EXTENDED VALUE (6 11);
  1023. *QBOX "Median test for k samples...";
  1024.  
  1025. FRIEDMAN AGGRESS HOURSTV AGE;
  1026.  
  1027. BOX ROW 7
  1028. The FRIEDMAN TEST is a procedure for testing
  1029. wether two or more related samples have been
  1030. drawn from the same population.
  1031. ENDBOX;
  1032.  
  1033. NPAR AGGRESS HOURSTV AGE NO
  1034.   /TAU-B EXACT 2TAIL LISTWISE;
  1035.  
  1036. BOX
  1037. The NPAR MATRIX displays a matrix for various measures
  1038. of association and concordance between two variables
  1039. (i.e. Spearman's Rs, Kendall's Tau-a and Tau-b, Kendall-
  1040. Stuart's Tau-c, symmetric and asymmetric Somer's D and
  1041. Goodman-Kruskal's Gamma).
  1042. ENDBOX;
  1043.  
  1044. CLS;
  1045. BOX
  1046. One of the most innovative features of SIMSTAT is
  1047. the inclusion of powerful bootstrap resampling
  1048. analysis.  To learn more about this revolutionary
  1049. new method, select the Bootstrap analysis from the
  1050. main menu.
  1051. ENDBOX;
  1052.  
  1053. BOX
  1054. Simstat also provides a lot of features useful for statistical
  1055. analysis such as:
  1056.  
  1057.   ■ conditional selection of cases
  1058.   ■ weighting of cases
  1059.   ■ user defined missing values on all type of files
  1060.   ■ variable and value labels
  1061. ENDBOX;
  1062.  
  1063. BOX
  1064. While SIMSTAT can be configured to automatically
  1065. call your own data editor, it also provides a
  1066. powerful spreadsheet for its own file format and
  1067. for SPSS files.
  1068. ENDBOX;
  1069.  
  1070. BOX
  1071. This editor named SIMEDIT allows you to import and export
  1072. most data file formats supported by SIMSTAT, modify the
  1073. values, perform conditional transformation, ranking and
  1074. recoding of data, compute new variables, and add missing
  1075. values, variable and value labels.
  1076. ENDBOX;
  1077.  
  1078. BOX
  1079. SIMEDIT includes 47 functions and operations for data
  1080. transformation including mathematic, trigonometric functions,
  1081. statistical operations on either cases or variables, date
  1082. functions and random number generating functions.
  1083. ENDBOX;
  1084.  
  1085. BOX
  1086. SIMSTAT also provides an add-in pulldown menu that gives you
  1087. an easy access to SIMSTAT add-in programs, script files,
  1088. or other utility programs to perform specific analyses or
  1089. tasks not available in SIMSTAT.  This feature can also be
  1090. used to run other programs you use often.
  1091. ENDBOX;
  1092.  
  1093. QBOX "SIMSTAT currently comes with 2 addin programs";
  1094.  
  1095. BOX
  1096. SIMCALC is a probability calculator that can
  1097. compute probabilities and confidence intervals
  1098. from user supplied statistics.
  1099. ENDBOX;
  1100.  
  1101. BOX
  1102. SIM2NL is an interface program that integrates
  1103. NONLIN 3.0, a powerful nonlinear multiple
  1104. regression program into SIMSTAT.  This program
  1105. allows among other things to enter the form
  1106. of equation to fit using normal algebric notation
  1107. and includes an extensive library of functions
  1108. including trig,  exponential, log, Bessel, elliptic
  1109. integrals, and many others. (see NONLIN.INF for
  1110. further information)
  1111. ENDBOX;
  1112.  
  1113. BOX
  1114. The registered version also includes another addin:
  1115. SIM2LOG which allows to integrate LOGISTIC v3.11,
  1116. a logistic multiple regression program within SIMSTAT.
  1117. ENDBOX;
  1118.  
  1119. BOX
  1120. A special addin program called Banner v1.0 is also available
  1121. to registered user for $15.  This addin program enables you
  1122. to produce presentation quality tables and banners.  For more
  1123. information about this addin program, select the BANNER v1.0
  1124. option from the main menu.
  1125. ENDBOX;
  1126.  
  1127.  
  1128. BOX
  1129. To learn more about the bootstrap resampling technique,
  1130. the new features introduced in version 3.5, or the
  1131. registration benifits, select the appropriate item from
  1132. the demo main menu.
  1133. ENDBOX;
  1134.  
  1135. GOTO MAINMENU;
  1136.  
  1137. ************************** BOOTSTRAP *************************;
  1138. :BOOT;
  1139. BOX
  1140. Bootstrap is a resampling technique invented by Bradley
  1141. Efron in 1977 which uses the computer's power to alleviate
  1142. present limitations of statistical theories.
  1143. ENDBOX;
  1144.  
  1145. BOX
  1146. Bootstrap simulation is a resampling technique whereby initial
  1147. sample subjects are treated as if they constitute the population
  1148. under study.  By replicating those data an infinite number of
  1149. times, we then draw at random from that population a large number
  1150. of samples, each the same size as the original sample.
  1151. ENDBOX;
  1152.  
  1153. BOX
  1154. By computing, for every bootstrap sample, a statistical estimator of
  1155. interest (such as a mean or a correlation between two variables),
  1156. this resampling procedure recreates an empirical sampling
  1157. distribution of this estimator.  Let us see an example:
  1158. ENDBOX;
  1159.  
  1160. BOX;
  1161. The SAMPLE.DAT file contains data from the "law school experiment"
  1162. presented by Diaconis & Efron (1983).  These authors tried to
  1163. estimate the sampling distribution of the correlation between
  1164. the average undegraduate grade point and the average score on
  1165. the law school admission test from a sample of 15 law schools.
  1166. ENDBOX;
  1167.  
  1168. DATA
  1169. LSAT    GPA
  1170. 576     3.39
  1171. 635     3.30
  1172. 558     2.81
  1173. 578     3.03
  1174. 666     3.44
  1175. 580     3.07
  1176. 555     3.00
  1177. 661     3.43
  1178. 651     3.36
  1179. 605     3.13
  1180. 653     3.12
  1181. 575     2.74
  1182. 545     2.76
  1183. 572     2.88
  1184. 594     2.96
  1185. ENDDATA;
  1186.  
  1187. CLS;
  1188. LIST ALL;
  1189.  
  1190. BOX
  1191. Here are the data
  1192. obtained from
  1193. those 15 schools.
  1194. ENDBOX;
  1195.  
  1196. BOX
  1197. We will now compute a regression analysis with the
  1198. GPA (grade point average) scores as the predictor
  1199. and the LSAT (law school admission test) score for
  1200. the dependent variable.
  1201. ENDBOX;
  1202.  
  1203. REGRESSION LSAT BY GPA;
  1204.  
  1205. BOX
  1206. The data obtained yielded a correlation coefficient of .7764
  1207. ENDBOX;
  1208.  
  1209. BOX
  1210. To estimate the accuracy of this statistic, we will now randomly
  1211. select 15 cases from the original sample and compute for each
  1212. bootstrap sample a new correlation coefficient.  In a given sample,
  1213. some schools may be selected more than once whereas others may not
  1214. be included, thereby producing a different correlation coefficient.
  1215. ENDBOX;
  1216.  
  1217. FULL /SAMPLING = 1
  1218.  /REGRESSION LSAT BY GPA;
  1219.  
  1220. BOX
  1221. Look at the coefficient of correlation above.  You will 
  1222. notice that the value is different from the one obtained 
  1223. from the original sample.
  1224. ENDBOX;
  1225.  
  1226. BOX
  1227. We will now perform 3 other regression analyses on
  1228. different bootstrap samples, pausing after each
  1229. analysis.  Look carefully at the values obtained.
  1230. ENDBOX;
  1231.  
  1232. FULL /SAMPLING = 1
  1233.  /REGRESSION LSAT BY GPA;
  1234. PAUSE;
  1235.  
  1236. FULL /SAMPLING = 1
  1237.  /REGRESSION LSAT BY GPA;
  1238. PAUSE;
  1239.  
  1240. FULL /SAMPLING = 1
  1241.  /REGRESSION LSAT BY GPA;
  1242. PAUSE;
  1243.  
  1244. BOX
  1245. If we keep the values obtained for each bootstrap sample
  1246. and look at their distribution, we obtain a fairly good
  1247. approximation of the sampling variability of that estimator.
  1248. Let's look at the distribution of the correlation coefficents
  1249. of 250 bootstrap samples.
  1250. ENDBOX;
  1251.  
  1252. GRAPH /TITLE "Distribution of 250 correlations";
  1253.  
  1254. BOOTSTRAP2 LSAT BY GPA
  1255.  /SAMPLING 250 DESC PTILES=10 INTERVAL=80
  1256.  /HISTO=G NBAR=40 MIN=0 INC=0.025;
  1257.  
  1258. BOX
  1259. SIMSTAT also provides various information on the estimators
  1260. such as descriptive statistics, percentile tables, and
  1261. confidence intervals.
  1262. ENDBOX;
  1263.  
  1264. BOX
  1265. The main advantage of the bootstrap approach over
  1266. traditional methods is that the distribution is not
  1267. mathematically estimated, but is empirically
  1268. constructed on the bases of all of the characteristics
  1269. of the original data distribution, including the ones
  1270. generally considered contaminating factors
  1271. (e.g., skewness, ceiling effect, outliers, etc.).
  1272. ENDBOX;
  1273.  
  1274. BOX
  1275. It can also be useful for describing the sampling
  1276. variability of estimators for which the sampling
  1277. properties are unknow or unavailable.
  1278. ENDBOX;
  1279.  
  1280. BOX
  1281. For example, boostrap simulation can be used to
  1282. obtain a standard deviation of a median even
  1283. if there are no mathematical formula available
  1284. to compute such a measure.
  1285. ENDBOX;
  1286.  
  1287. BOX
  1288. Typical applications of bootstrap resampling include:
  1289.  
  1290.   ■ computation of nonparametric estimates of sampling distributions.
  1291.   ■ assessment of the stability of statistical models.
  1292.   ■ construction of nonparametric confidence intervals.
  1293.  
  1294. ENDBOX;
  1295.  
  1296. BOX
  1297. SIMSTAT provides bootstrap analysis for seven descriptive
  1298. estimators of a single variable and twenty estimators
  1299. involving two variables.  Those estimators are:
  1300.  
  1301.    One variable estimators:
  1302.       ■ Mean
  1303.       ■ Median
  1304.       ■ Variance
  1305.       ■ Standard deviation
  1306.       ■ Standard error
  1307.       ■ Skewness
  1308.       ■ Kurtosis
  1309. ENDBOX;
  1310.  
  1311. BOX
  1312.    Two-variable estimators:
  1313.       ■ Kendall's tau-a and b
  1314.       ■ Kendall-Stuart's tau-c
  1315.       ■ Symmetric and asymmetric Somers' d
  1316.       ■ Goodman-Kruskal's gamma
  1317.       ■ Student's t and F
  1318.       ■ Pearson's r
  1319.       ■ Spearman's rho
  1320.       ■ Regression slope and intercept
  1321.       ■ Mann-Whitney's U
  1322.       ■ Wilcoxon's W
  1323.       ■ Difference between means
  1324.       ■ Difference between variances
  1325.       ■ Sign test
  1326.       ■ Kruskal-Wallis ANOVA
  1327.       ■ Median test
  1328. ENDBOX;
  1329.  
  1330. BOX
  1331. The FULL ANALYSIS bootstrap procedure also allows you
  1332. to perform almost any statistical analysis available
  1333. in SIMSTAT on successive bootstrap samples.
  1334. ENDBOX;
  1335.  
  1336. BOX
  1337. For example, it is possible to do a frequency analysis,
  1338. a crosstabulation or a multiple regression on each
  1339. bootstrap sample.  Specific statistics can then be
  1340. extracted from the listing file with the use of a text
  1341. editor then stored in a new data file for further analysis.
  1342. ENDBOX;
  1343.  
  1344. BOX
  1345. Bootstrap resampling analysis usually involves redrawn
  1346. samples of the same size as the original one. SIMSTAT
  1347. offers the possibility to modify the dimension of the
  1348. bootstrap samples, thus allowing users to compare
  1349. estimator distributions obtained from using different
  1350. sample sizes.  You can set bootstrap simulations
  1351. involving sample sizes that range from 2 to 20,000
  1352. observations.
  1353. ENDBOX;
  1354.  
  1355. BOX
  1356. The possibility of comparing various estimator distributions
  1357. obtained for different sample sizes can prove useful in
  1358. planning research by allowing the researcher to determine
  1359. the sample size needed to achieve a desired precision level.
  1360. ENDBOX;
  1361.  
  1362. BOX
  1363. It can also be used for power estimation, allowing comparison
  1364. of the power attained using various estimators and/or sample
  1365. sizes.  Researchers thus have an empirical basis for choosing
  1366. between two different statistical strategies.  In addition,
  1367. unlike standard approaches to power estimation which rely
  1368. on numerous assumptions, including normal data distribution,
  1369. bootstrap power estimates make no distribution assumptions.
  1370. ENDBOX;
  1371.  
  1372. BOX
  1373. As a teaching tool, bootstrap simulation would be effective
  1374. in illustrating to new statistics students concepts such as
  1375. sampling theory or central limit theorem. It would provide
  1376. a simulation of the sampling process of an experiment,
  1377. allowing the students to visualize the sampling variability
  1378. of given estimators.
  1379. ENDBOX;
  1380.  
  1381. BOX
  1382. By increasing or decreasing sample size, the student can
  1383. observe how these changes affect the variability of
  1384. estimators or the statistical power of an experiment.
  1385. Additionally, bootstrap would be effective in demonstrating
  1386. how outliers can affect estimation and how data
  1387. transformation can improve population estimates.
  1388. ENDBOX;
  1389.  
  1390. BOX
  1391. For example, it may be possible to perform successive
  1392. bootstrap simulations of a variable's mean while increasing
  1393. the sample size for each simulation and ask students
  1394. to describe what happens.
  1395. ENDBOX;
  1396.  
  1397. BOX
  1398. Let's do it on the GPA variable with
  1399. successive sample sizes of 2, 10 and 30.
  1400. ENDBOX;
  1401.  
  1402. GRAPH /TITLE "Distribution of means (n = 2)" SCALEY (0, 100);
  1403. BOOTSTRAP1 GPA
  1404.   /MEAN SIZE=2 SAMPLING=250 HISTO=G NBAR=40 MIN=2.5 INC=0.025;
  1405.  
  1406. GRAPH /TITLE "Distribution of means (n = 10)" SCALEY (0, 100);
  1407. BOOTSTRAP1 GPA
  1408.   /MEAN SIZE=10 SAMPLING=250 HISTO=G NBAR=40 MIN=2.5 INC=0.025;
  1409.  
  1410. GRAPH /TITLE "Distribution of means (n = 30)" SCALEY (0, 100);
  1411. BOOTSTRAP1 GPA
  1412.   /MEAN SIZE=30 SAMPLING=250 HISTO=G NBAR=40 MIN=2.5 INC=0.025;
  1413.  
  1414. :USER_TEST;
  1415.  
  1416. IBOX ROW 4 COLOR BLACK ON LIGHTGRAY;
  1417. You may now try it yourself by entering
  1418. your own sample size.  Enter a number
  1419. between 1 and 300. Or enter 0 to end.
  1420. ENDBOX;
  1421.  
  1422. GETNUM $NUM0 "Sample size : " MIN=0 MAX=300 LEN=3;
  1423.  
  1424. IF $NUM0 = 0 THEN GOTO END_TEST;
  1425.  
  1426. GRAPH /TITLE "Distribution of means (n = $NUM0)" SCALEY (0, 100);
  1427.  
  1428. BOOTSTRAP1 GPA
  1429.   /MEAN SIZE=$NUM0 SAMPLING=250 HISTO=G NBAR=40 MIN=2.5 INC=0.025;
  1430.  
  1431. GOTO USER_TEST;
  1432. :END_TEST;
  1433.  
  1434.  
  1435. BOX
  1436. We have presented here only a glimpse of the bootstrap
  1437. capabilities.  To learn more about this new technique,
  1438. here are some good introductory references to bootstrap;
  1439.  
  1440. Diaconis, P., & Efron, B. (1983).  Computer-intensive methods
  1441.   in statistics.  SCIENTIFIC AMERICAN, 248(5), 116-130.
  1442.  
  1443. Efron, B., & Tibshirani, R.J. (1993).  An introduction to the
  1444.   bootstrap.  New-York: Chapman & Hall.
  1445.  
  1446. Mooney, C.Z. & Duval, R.D. (1993).  Bootstrapping: A nonpara-
  1447.   metric approach to statistical inference.  Beverly Hill:
  1448.   Sage Publication.
  1449.  
  1450. ENDBOX;
  1451.  
  1452. GRAPH /TITLE "";
  1453.  
  1454. GOTO MAINMENU;
  1455.  
  1456. ****************************** NEW FEATURES ****************************;
  1457. :NEW;
  1458.  
  1459. OPEN SAMPLE.SPS;
  1460.  
  1461. CLS;
  1462.  
  1463. BOX
  1464. Simstat v3.5 provides many improvements
  1465. to version v3.0.  Let's take a quick look
  1466. at all those new features.
  1467. ENDBOX;
  1468.  
  1469. BOX
  1470. Many new types of graph have been added
  1471. to the numerous ones already available.
  1472. ENDBOX;
  1473.  
  1474. BOX
  1475. For instance, the FREQUENCY command allows
  1476. you to display a normal probability plot
  1477. of a variable in order to verify whether the
  1478. variable is normally distributed.
  1479. ENDBOX;
  1480.  
  1481. FREQUENCY AGGRESS /PPLOT;
  1482.  
  1483. CLS;
  1484. BOX
  1485. The ONEWAY command which performs a one-way
  1486. analysis of variance now includes 3 types
  1487. of graphs that allow you to compare the
  1488. means of the various groups.
  1489. ENDBOX;
  1490.  
  1491. BOX
  1492. a bar chart representing the mean of every group with
  1493. an option to display an error bar representing either
  1494. the standard deviation, the standard error or a user
  1495. defined confidence interval;
  1496. ENDBOX;
  1497.  
  1498. ONEWAY AGGRESS BY SIBLING /BARCHART;
  1499. ONEWAY AGGRESS BY SIBLING /BARCHART CIBAR;
  1500.  
  1501. BOX
  1502. an error bar diagram which provide another way
  1503. to represent the same kind of information;
  1504. ENDBOX;
  1505.  
  1506. ONEWAY AGGRESS BY AGE / ERRORCHART;
  1507.  
  1508. CLS;
  1509. BOX
  1510. and a deviation barchart which expresses the deviation
  1511. of the mean of each group from the grand mean.
  1512. ENDBOX;
  1513. ONEWAY AGGRESS BY AGE /DEVCHART;
  1514.  
  1515. CLS;
  1516. BOX
  1517. Beside the new barchart and the error bar
  1518. diagram, the T-TEST command also produces
  1519. a DUAL HISTOGRAM which allows you to inspect
  1520. in detail the data distribution in both groups.
  1521. ENDBOX;
  1522.  
  1523. QBOX "This type of graph can either be displayed horizontally";
  1524.  
  1525. T-TEST AGGRESS BY SEX
  1526.  /GROUP VALUE (1 2) HISTO NORMAL;
  1527.  
  1528. CLS;
  1529. QBOX "or vertically";
  1530.  
  1531. T-TEST AGGRESS BY SEX
  1532.  /GROUP VALUE (1 2) HISTO VERTICAL;
  1533.  
  1534. CLS;
  1535. BOX
  1536. A scatterplot matrix can also be obtained from the
  1537. CORRELATION command in order to graphically examine
  1538. the relationships between numerous variables.
  1539. ENDBOX;
  1540.  
  1541. CORRELATION NO AGE AGGRESS HOURSTV /XYPLOT TREND;
  1542.  
  1543. BOX
  1544. Finally, an option to display a normal
  1545. probability plot of residual values has
  1546. been added to the REGRESSION, MULTIPLE
  1547. REGRESSION, and GLM ANOVA/ANCOVA commands.
  1548. ENDBOX;
  1549.  
  1550. BOX
  1551. Here is an example of a normal probability plot of
  1552. residual values produced by the REGRESSION command.
  1553. ENDBOX;
  1554.  
  1555. REGRESSION AGGRESS BY HOURSTV /PPLOT;
  1556.  
  1557. CLS;
  1558. BOX
  1559. Beside all those new graphs, you will find some
  1560. minor improvements such as the implementation
  1561. of the Levene's test of homogenity of variance
  1562. in the T-TEST procedure.
  1563. ENDBOX;
  1564.  
  1565. CLS;
  1566. BOX
  1567. Also, when performing a linear, nonlinear or multiple
  1568. regression, or a multi-way anova/ancova, predicted and
  1569. residual values can now be saved in a separate file
  1570. along with the values of all the selected variables.
  1571. ENDBOX;
  1572.  
  1573. BOX
  1574. However, the most important new feature is without any
  1575. doubt the implementation of a powerful command language.
  1576. To learn more about this language, select the fourth option
  1577. of the demonstration main menu.
  1578. ENDBOX;
  1579.  
  1580. GOTO MAINMENU;
  1581.  
  1582. ****************  COMMAND LANGUAGE **********************;
  1583.  
  1584. :LANGUAGE;
  1585. BOX
  1586. While SIMSTAT pulldown menus and open panels allow you to
  1587. quickly and easily do your analyses, the new command language
  1588. can increase your productivity when you need to:
  1589.  
  1590.    ■ keep track of all the analyses performed,
  1591.    ■ provide to someone else a description of what you did,
  1592.    ■ automate statistical processis of your data files,
  1593.    ■ quickly perform similar analyses on different data files.
  1594.  
  1595. ENDBOX;
  1596.  
  1597. BOX
  1598. For example, the following commands open a data file named SAMPLE.SPS,
  1599. select all the subjects older than 8 years old, set the listing file
  1600. to C:\DATA\FIRST.LIS, open this file for input and finally perform a
  1601. t-test analysis to compare the level of aggressivity of male and female
  1602. subjects, with dual histogram.
  1603.  
  1604.     OPEN SAMPLE.SPS;
  1605.     SELECT AGE > 8;
  1606.     SET LISTING C:\DATA\FIRST.LIS;
  1607.     SET DISK ON;
  1608.     T-TEST AGGRESS BY SEX /GROUP VALUE (1 2) HISTO;
  1609.  
  1610. ENDBOX;
  1611.  
  1612. BOX
  1613. Special features of this command language also allow you
  1614. to write interactive tutorials, demonstration programs
  1615. or even simple applications to be used by someone else
  1616. who is not familiar with SIMSTAT.
  1617. ENDBOX;
  1618.  
  1619. BOX
  1620. Those special commands allow you to display
  1621. textual information (just like this screen),
  1622. ENDBOX;
  1623.  
  1624. BOX
  1625. wait for a specific key to be pressed, allowing
  1626. you to create menus or question tests like...
  1627. ENDBOX;
  1628.  
  1629. :QUESTION;
  1630.  
  1631. IBOX ROW 6
  1632. What does the probability value stands for?
  1633. ENDBOX;
  1634.  
  1635. BOX KEY=ABCDE ROW 12
  1636. A) The probability that the null hypothesis is true
  1637. B) The probability that the null hypothesis is false
  1638. C) The probability of the data given the null hypothesis
  1639. D) The probability of the null hypothesis given the data
  1640. E) None of the above
  1641. ENDBOX;
  1642.  
  1643. IF $ANSWER = 'C' THEN GOTO RIGHT;
  1644. QBOX "Wrong";
  1645. GOTO QUESTION;
  1646.  
  1647. :RIGHT;
  1648. QBOX "Right";
  1649.  
  1650. IBOX ROW 5;
  1651. construct a bouncing bar menu
  1652. ENDBOX;
  1653.  
  1654. MENU
  1655. &First item
  1656. &Second item
  1657. &Third item
  1658. ENDMENU;
  1659.  
  1660. QBOX "play sound or music";
  1661.  
  1662. SOUND F=400 D=0;
  1663. QBOX "WELCOME TO SIMSTAT V3.5" ROW 5 COL 2 DELAY 300 COLOR WHITE ON RED;
  1664. SOUND F=600 D=0;
  1665. QBOX "WELCOME TO SIMSTAT V3.5" ROW 6 COL 6 DELAY 300 COLOR WHITE ON BROWN;
  1666. SOUND F=800 D=0;
  1667. QBOX "WELCOME TO SIMSTAT V3.5" ROW 7 COL 10 DELAY 300 COLOR WHITE ON GREEN;
  1668. SOUND F=1000 D=0;
  1669. QBOX "WELCOME TO SIMSTAT V3.5" ROW 8 COL 14 DELAY 300 COLOR WHITE ON BLACK;
  1670. SOUND F=1200 D=0;
  1671. QBOX "WELCOME TO SIMSTAT V3.5" ROW 9 COL 18 DELAY 300 COLOR WHITE ON CYAN;
  1672. SOUND F=1600 D=0;
  1673. QBOX "WELCOME TO SIMSTAT V3.5" ROW 10 COL 22 DELAY 600 COLOR BLACK ON LIGHTGRAY;
  1674. SOUND OFF;
  1675.  
  1676. IBOX ROW 4
  1677. It is also possible to ask the user to enter
  1678. a numeric or alphanumeric values that can be
  1679. inserted almost anywhere in the command file.
  1680. ENDBOX;
  1681.  
  1682. GETSTR "What is your first name? "  $STR1 LEN 15 CLEAR;
  1683.  
  1684. QBOX "Thank you $STR1!";
  1685.  
  1686. CLS;
  1687. GETNUM "2 + 2 =  " $NUM1 LEN 3 CLEAR;
  1688.  
  1689. IF $NUM1 = 4 THEN
  1690.   QBOX "Very good $STR1!";
  1691. IF $NUM1 <> 4 THEN
  1692.  QBOX "Wrong answer $STR1!" COLOR WHITE ON RED;
  1693.  
  1694. BOX
  1695. Option panels can also be invoked prior to
  1696. the computation of an analysis to allow
  1697. the user to specify the various options.
  1698. ENDBOX;
  1699.  
  1700. OPEN SAMPLE.SPS;
  1701.  
  1702. BREAKDOWN AGGRESS BY SEX
  1703.  /PANEL;
  1704.  
  1705. DELAY 300;
  1706. CLS;
  1707. BOX
  1708. The command language also allow you to run external
  1709. program, perform conditional operation in response to
  1710. some conditions or input from the user;
  1711. ENDBOX;
  1712.  
  1713. BOX
  1714. SIMSTAT script files (.SCR) are plain text files
  1715. and can be created and edited from within SIMSTAT
  1716. or using almost any word processor.
  1717. ENDBOX;
  1718.  
  1719. BOX
  1720. They can be executed from the DOS prompt or run
  1721. from within SIMSTAT.  They can also be added to
  1722. the ADDIN pulldown menu.
  1723. ENDBOX;
  1724.  
  1725. BOX
  1726. A RECORD script feature can automatically generate
  1727. proper commands corresponding to the actions you
  1728. take using the menus and options panels.
  1729. ENDBOX;
  1730.  
  1731. BOX
  1732. This demonstration program was entirely written using
  1733. this new command language.  To learn more about it,
  1734. read the COMMAND.DOC or examine the content of the
  1735. DEMO.SCR file.
  1736. ENDBOX;
  1737.  
  1738. GOTO MAINMENU;
  1739.  
  1740. *********************** ORDER ************************;
  1741. :ORDER;
  1742.  
  1743. BOX
  1744. Registering your copy of SIMSTAT will provide you many benefits
  1745. such as:
  1746.  
  1747.   ■ registered version without reminder screens;
  1748.   ■ 170-page manual;
  1749.   ■ minimum of 3 months of free support;
  1750.   ■ free upgrade to the next version;
  1751.   ■ substantial discounts on further upgrades;
  1752.   ■ the ability to edit the title printed on each page;
  1753.   ■ batch program compiler/encrypter;
  1754.   ■ ability to run SIMCALC as a standalone application;
  1755.   ■ SIM2NL addin program to run Phillip Sherrod's NONLIN
  1756.     from within SIMSTAT;
  1757.   ■ SIM2LOG addin program to run G.E. Dallal's LOGISTIC
  1758.     from within SIMSTAT (the logistic regression program
  1759.     is also included on the distribution disk).
  1760. ENDBOX;
  1761.  
  1762. BOX
  1763. For check or money order registration,
  1764. send your order to:
  1765.  
  1766.            Normand Peladeau
  1767.            5000 Adam Street
  1768.            Montreal, QC
  1769.            CANADA,  H1V 1W5
  1770.            Voice/Fax: (514) 899-1672
  1771. ENDBOX;
  1772.  
  1773. BOX
  1774. You can also register SIMSTAT with your credit card (MasterCard,
  1775. Visa, AmEx, Discover) from Public (software) Library:
  1776.  
  1777.        Phone: 1-800-242-4775 (from overseas: 713-524-6394)
  1778.          FAX: 713-524-6398
  1779.   CompuServe: 71355,470
  1780.     Internet: 71355.470@compuserve.com
  1781.         Mail: Public (Software) Library,
  1782.               P.O. Box 35705,
  1783.               Houston, TX
  1784.               USA  77235-5705.
  1785.  
  1786. To register with CIS's Software Registration Service: enter GO SWREG
  1787. at the ! prompt and follow the menus. SIMSTAT registration ID is 3339.
  1788. SIMSTAT with BANNER v1.0 registration ID is 3562.
  1789. ENDBOX;
  1790.  
  1791. GOTO MAINMENU;
  1792.  
  1793. :BANNER;
  1794. CALL BANNER.SCR;
  1795.  
  1796. GOTO MAINMENU;
  1797.